{extend name="template/base" /}
{block name="content"}
<div class="page-container">
    <form class="mb-20" method="post" action="{:\\think\\Url::build($Request.action)}">
        <input type="hidden" name="pid" value="{$id ?? 0}">
        <input type="text" class="input-text" id="upload" placeholder="请点击后面的上传按钮" name="img" value="" style="width: 50%">
        <button type="button" class="btn btn-primary radius" onclick="layer_open('文件上传','{:\\think\\Url::build(\'Upload/index\', [\'id\' => \'upload\'])}')">上传</button>
        <a onclick="$(this).attr('href', $('#upload').val())" type="button" class="btn btn-default radius" data-lightbox="preview">预览</a>
        <button type="submit" class="btn btn-success radius" id="" name="">添加</button>
    </form>
    <table class="table table-border table-bordered table-hover table-bg mt-20">
        <thead>
        <tr class="text-c">
            <th width="25"><input type="checkbox" value="" name=""></th>
            <th width="50">{:sort_by('ID','id')}</th>
            <th width="50">项目名称</th>
            <th width="100">图片</th>
            <th width="100">操作</th>
        </tr>
        </thead>
        <tbody>
        {volist name="imgs" id="vo"}
        <tr class="text-c">
            <td class="f-14"><input type="checkbox" name="id[]" value="{$vo.id}"></td>
            <td class="f-14">{$vo.id}</td>
            <td class="f-14">{$vo.pid}</td>
            <td class="f-14">
                <img src="{$vo.img}" alt="{$vo.img}" width="250px">
            </td>
            <td class="f-14">
                {tp:menu menu='sdelete' url='/admin/xmdj/imgdel'/}
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
</div>
{/block}
{block name="style"}
<link rel="stylesheet" href="__LIB__/lightbox2/css/lightbox.min.css">
{/block}
{block name="script"}
<script src="__LIB__/lightbox2/js/lightbox.min.js"></script>
{/block}